﻿using AutoMapper;
using Sustainalytics.Entities.RiskRatings;
using System.Collections.Generic;
using System.Linq;

namespace Sustainalytics.ClientDW.Synchronization.SyncRiskRatingsData
{
    public class RiskRatingClusterMapping
    {
        public static IEnumerable<RiskRatingCluster> Map(
            IList<SharedEntities.RiskRatingsResearch.RiskRatingCluster> sharedClusters)
        {
            return sharedClusters.Select(Mapper.Map<RiskRatingCluster>);
        }

        public static IEnumerable<ManagementCluster> Map(
            IList<SharedEntities.RiskRatingsResearch.ManagementCluster> sharedClusters)
        {
            return sharedClusters.Select(Mapper.Map<ManagementCluster>);
        }

        public static IEnumerable<ManageableCluster> Map(
            IList<SharedEntities.RiskRatingsResearch.ManageableCluster> sharedClusters)
        {
            return sharedClusters.Select(Mapper.Map<ManageableCluster>);
        }

        public static IEnumerable<ExposureCluster> Map(
            IList<SharedEntities.RiskRatingsResearch.ExposureCluster> sharedClusters)
        {
            return sharedClusters.Select(Mapper.Map<ExposureCluster>);
        }
    }
}
